﻿function WorkflowScript() {
    this.Activites = new Array();
    this.Connections = new Array();
    this.toXml = function () {
        var script = "<Workflow>";

        script += "<Activites>";
        for (var i = 0; i < this.Activites.length; i++) {
            script += this.Activites[i].toXml();
        }
        script += "</Activites>";

        script += "<Connections>";
        for (var i = 0; i < this.Connections.length; i++) {
            script += this.Connections[i].toXml();
        }
        script += "</Connections>";

        script += "</Workflow>";
        return script;
    };
};